import React, { Component } from 'react'
import { Route, Switch, Redirect } from 'react-router'
import Login from './login'
import Register from './login/register'
import MainPage from './main'


export default class Router extends Component {
    render() {
        return (
            <div style={{ width: "100%", height: "100%" }}>
                <Switch>
                    <Route path="/" exact render={() => <Redirect to="login" />} />
                    <Route path="/login" component={Login} />
                    <Route path="/register" component={Register} />
                    <Route path="/main" component={MainPage} />
                </Switch>
            </div>
        )
    }
}
